﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace NX5Web.Controllers.WSSObjects
{
    public class ExamLink 
    {

        public class ExamInfo : WssResponse
        {
            public Guid ExamId { get; set; }
            public String Role { set; get; }

            public String Msg { set; get; }
        }

        private static Dictionary<Guid, List<WssResponse>> dic = new Dictionary<Guid, List<WssResponse>>();

        public void EnterExam(Guid ExamId, WssResponse resp)
        {
            if (dic.ContainsKey(ExamId))
            {
                dic[ExamId].Add(resp);
            }
            else
            {
                List<WssResponse> wsr = new List<WssResponse>();
                wsr.Add(resp);
                dic.Add(ExamId, wsr);
            }
        }

        public List<WssResponse> GetExam(Guid ExamId)
        {
            if (dic.ContainsKey(ExamId))
            {
                return dic[ExamId];
            }
            return null;
        }

    }
}